Ignoring Files
To exclude specific files or patterns from being processed by the MadQualityPluginII, you can utilize the .mqignore
file. This file functions similarly to a .gitignore
file, allowing you to specify which files the plugin should ignore during its operations.
Creating and Configuring the .mqignore
File
-
Create the
.mqignore
File:- In the root directory of your project (or in any subdirectory where you want specific ignore rules to apply), create a new file named
.mqignore
.
- In the root directory of your project (or in any subdirectory where you want specific ignore rules to apply), create a new file named
-
Edit the
.mqignore
File:- Open the
.mqignore
file in a text editor like Notepad. - Add the filenames or patterns of the files you wish to exclude from processing. Each pattern or filename should be on a new line.
- Open the
Examples of .mqignore
Entries
-
Ignore a Specific File: To ignore a specific file, simply add its name to the
.mqignore
file. For example, to ignoreMySnippet.flsnp
, add the following line:MySnippet.flsnp
-
Ignore All Files of a Specific Type: To ignore all files of a particular type, use a wildcard
*
. For example, to ignore all.flsnp
files, add this line:*.flsnp
-
Ignore Files in a Specific Subdirectory: To ignore all files within a specific subdirectory, include the directory name followed by a slash and a wildcard. For example, to ignore all files in the
temp
directory:temp/*
-
Ignore Files Based on Complex Patterns: You can use standard glob patterns to match multiple files. For example, to ignore all XML files that start with
temp_
:temp_*.xml
How It Works
- When the Mad Quality Plugin runs, it checks each file against the patterns listed in the
.mqignore
file(s). - If a file matches any of the patterns, it is excluded from all plugin processing activities.
- This setup helps in focusing the quality checks on relevant files and can improve processing times by skipping unnecessary files.
Best Practices
- Regular Updates: Keep the
.mqignore
file updated as new files or directories are added to your project that you wish to ignore. - Use Comments: You can add comments in your
.mqignore
file by starting the line with a#
. This is useful for documenting why certain files or patterns are ignored.# Ignore backup snippets
*.bak
By properly configuring the .mqignore
file, you can efficiently manage which files are processed by the Mad Quality Plugin, ensuring that the plugin's operations are both relevant and optimized for your project's needs.